/**
 * @see https://umijs.org/zh-CN/plugins/plugin-access
 * */
export default function access(initialState: any) {
  console.log('加载完毕');
  console.log(initialState);
  const { userMenusKeys } = initialState;

  return {
    businessReportItem: {
      add: false,
    },
    normalRouteFilter: (route: any) => {
      // console.log(route);
      return userMenusKeys.includes(route.key);
    },
  };
}
